package com.ethink.warehouse.facade.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.LogisticsTraceDetailOrderFacade;
import com.ethink.warehouse.api.info.LogisticsTraceDetailOrderInfo;
import com.ethink.warehouse.api.request.LogisticsTraceDetailOrderListRequest;
import com.ethink.warehouse.api.request.LogisticsTraceDetailOrderQueryRequest;
import com.ethink.warehouse.api.request.LogisticsTraceDetailOrderUpdateRequest;
import com.ethink.warehouse.api.response.LogisticsTraceDetailOrderDeleteResponse;
import com.ethink.warehouse.api.response.LogisticsTraceDetailOrderUpdateResponse;
import com.ethink.warehouse.manager.MateInventoryManager;
import com.ethink.warehouse.service.LogisticsTraceDetailOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 入库/出库单 Facade接口实现
 *
 * @author default
 * @date 2022-11-10
 */
@RestController
@Slf4j
@RequestMapping("warehouse-service/facade/v1/logisticsTraceDetailOrder")
public class LogisticsTraceDetailOrderFacadeImpl implements LogisticsTraceDetailOrderFacade {

    @Autowired
    private LogisticsTraceDetailOrderService logisticsTraceDetailOrderService;

    @Autowired
    private MateInventoryManager mateInventoryManager;

    @Override
    public Page<LogisticsTraceDetailOrderInfo> queryLogisticsTraceDetailOrder(LogisticsTraceDetailOrderQueryRequest request) {
        return logisticsTraceDetailOrderService.queryLogisticsTraceDetailOrder(request);
    }

    @Override
    public LogisticsTraceDetailOrderInfo getLogisticsTraceDetailOrderById(Long logisticsTraceDetailOrderId) {
        return logisticsTraceDetailOrderService.getLogisticsTraceDetailOrderById(logisticsTraceDetailOrderId);
    }

    @Override
    public List<LogisticsTraceDetailOrderInfo> listLogisticsTraceDetailOrder(LogisticsTraceDetailOrderListRequest request) {
        return logisticsTraceDetailOrderService.listLogisticsTraceDetailOrder(request);
    }

    @Override
    public LogisticsTraceDetailOrderUpdateResponse updateLogisticsTraceDetailOrder(LogisticsTraceDetailOrderUpdateRequest request) {
        return logisticsTraceDetailOrderService.updateLogisticsTraceDetailOrder(request);
    }

    @Override
    public LogisticsTraceDetailOrderDeleteResponse deleteLogisticsTraceDetailOrder(Long logisticsTraceDetailOrderId) {
        return logisticsTraceDetailOrderService.deleteLogisticsTraceDetailOrder(logisticsTraceDetailOrderId);
    }

}